import "./../css/common.css";
//引入js
import $ from "./jquery.min.js";


$('body').on("click","#loginBtn",function(){
    $.ajax({
        url:'/Users/login',
        type:"post",
        data:{
            userPhone:$('#username').val(),
            userPass:$("#password").val()
        },
        success:function({code,token,data}){
            if(code==200){
                //登录成功
                //token保存到本地
                localStorage.token = token;
                //跳转页面
                location.href="html/index.html";
            }
            console.log(data);
        }
    })
});
